Document sensing apparatus and method

ABSTRACT

A device for sensing currency comprises means for deriving a signal from a currency item and means for deriving values representative of a characteristic or characteristics of the currency item from said signal using an inverse representation of part of the sensing device.

[0001] The invention relates to an apparatus and method for sensing documents, and a method for calibrating a document sensor. The invention relates especially to an apparatus for optically sensing and validating documents such as banknotes or other value sheets.

[0002] An example of a prior art optical sensing device is given in U.S. Pat. No. 5,304,813. The device has a pair of linear arrays of light sources, each array arranged above the transfer path of a banknote, for emitting light towards the banknote, and a detector in the form of a linear array of photodetectors arranged above the transfer path for sensing light reflected by the banknote. The light source arrays have a number of groups of light sources, each group generating light of a different wavelength. The groups of light sources are energised in succession to illuminate a banknote with a sequence of different wavelengths of light. The response of the banknote to the light of the different parts of the spectrum is sensed by the detector array. Because each of the photodetectors in the array receives light from a different area on the banknote, the spectral response of the different sensed parts of the banknote can be determined and compared with stored reference data to validate the banknote.

[0003] In known banknote validators of the type such as described in U.S. Pat. No. 5,304,813, it is usual to pulse each light source for a predetermined time that is sufficient to let the detected signal rise to a stable value. The desirability to increase the speed of document processing calls for short pulses on the sources and short response times in the detector. Consequently, the bandwidth requirement in the detector circuit needs to be wide, typically of the order of 160 KHz, to avoid signal distortion. This in turn leads to a degradation of the signal to noise ratio, as noise increases in proportion to the square root of the bandwidth.

[0004] Typically, there are variations in the output for different light sources of the same wavelength for the same applied current, because of manufacturing variations. Also, sources of different wavelengths can have intrinsically different power outputs. For example, a green light source is capable of generating only approximately half the detector output of a red or infra-red light source. It is known to compensate for such variations by varying the current supplied to the source using a DAC and a current generator. Similarly, undesirable variations occurring in the detected signal can be accounted for by using a variable gain amplifier in the detector circuit.

[0005] A problem with adjusting the current supplied to the LEDs is that the output is not exactly proportional to the current for large changes, and also the LED wavelength changes with the intensity of the current.

[0006] It is desirable to provide a currency sensing apparatus which has a high signal to noise ratio and which can be produced at low cost.

[0007] Accordingly, the invention provides a device for sensing currency comprising means for deriving a signal from a currency item and means for deriving values representative of a characteristic or characteristics of the currency item from said signal using an inverse representation of part of the sensing device. Preferably, the invention is used for sensing banknotes or other value sheets. The invention can also be used for sensing other items, such as other types of documents.

[0008] In other words, the invention takes a model of the sensor system response, and uses an inverse of that model, and a signal output from the modelled system, to derive values representative of the sensed currency. This can enable, for example, the sensor signal to be read faster, without needing to wait for it to settle to a stable value. Preferably, the inverse representation is a digital filter having a transfer function corresponding to the inverse model.

[0009] In an application of the invention, where a banknote is transported at a speed of 360 nm/sec past the sensor, the spectral content of the signal generated in reading the printed pattern on a banknote using a sensor spot size of approximately 5-7 mm is limited to a rather low frequency, usually below 50 Hz.

[0010] Therefore it is proposed, in an embodiment of the invention, to use an analog low pass filter as a dominant pole to limit the bandwidth of the detector stage to approximately 300 Hz, which is generally too low to allow the signal to rise and reach a stable condition during the duration of the excitation pulse. The signal is then preferably sampled, converted and processed in the digital domain. A digital signal processing technique (digital signal reconstruction) is then used to reconstruct the input signal as if there was no filter, to determine its input amplitude, which corresponds to the desired information read from the document. In other words, the excitation at the input of the low-pass filter is computed by deconvolving the output signal with the digital model of the filter. This is accomplished by using, for the deconvolution, the inverse function of the digital filter modelling the analog filter and its excitation signal. The resulting bandwidth of this process is approximately 1 kHz. In the above context, this allows a noise reduction of {square root}{square root over (160)}, assuming a white noise. The advantage of this technique is noise reduction at low hardware cost. In an embodiment, for simplicity and lower cost, a single pole filter is used and rectangular excitation pulses are used. Advantageously, when the measurements are made during the off time of the LEDs, a non-recursive inverse digital filter with only two coefficients can be used. Note that although being more complex and more expensive, multi-pole filters and other excitation forms could be used without departing from the invention.

[0011] The values for the pattern on, for example, the document reconstructed in accordance with the invention are in theory independent of the apparatus, particularly the filter and excitation pulse. This means that reference values for validation purposes for each banknote, in the case of a banknote validator, can be derived and used without reference to each individual validator. This makes it easier, for example, to update a validator by adding reference values for a new banknote denomination to be accepted by the validator.

[0012] The inverse digital filter, particularly the coefficients, can be derived theoretically or experimentally. An advantage of the experimental approach is that it takes account of the actual performance of the apparatus, compensating for dispersions of component values in manufacture. This also means that the values for the pattern on the documents reconstructed in accordance with the invention are more accurate, which may be especially useful when, for example, standard reference values for a banknote denomination have not been derived with reference to the apparatus in use.

[0013] The invention also provides a method of adjusting a currency sensing device comprising at least one excitation source and at least one excitation sensor, the source being controllable by a pulse excitation signal, the method comprising adjusting the width of the pulses such that a signal derived from the excitation sensor approaches a desired value. The invention also provides a processor for reconstructing a representation of a signal input to a filter using a signal output from the filter comprising an inverse representation of the filter, and a corresponding method. The invention also provides a currency sensor wherein measurements of a signal derived from a currency item and generated using at least one pulsed excitation source are taken when the excitation source is off. Other aspects of the invention are set out in the claims.

[0014] An embodiment of the invention, and modifications, will be described with reference to the accompanying drawings of which:

[0015]FIG. 1 schematically illustrates an optical sensing device according to an embodiment of the invention;

[0016]FIG. 2 schematically illustrates the power-delivery arrangement for a light source array used in the arrangement of FIG. 1;

[0017]FIG. 3 shows a side view of components of a banknote validator;

[0018]FIG. 4 is a block diagram of components of the optical sensing device;

[0019]FIG. 5 is a graph illustrating operation of the embodiment;

[0020]FIG. 6 is a graph illustrating operation of the embodiment;

[0021]FIG. 7 is a graph illustrating operation of the embodiment;

[0022]FIG. 8 is a functional block diagram;

[0023]FIG. 9 is a timing diagram for a modification of the embodiment;

[0024]FIG. 10 is a graph for illustrating the modification;

[0025]FIG. 11 is a graph for illustrating the modification;

[0026]FIG. 12 is a block diagram of current supply control means;

[0027]FIG. 13 is a block diagram of second current supply control means;

[0028]FIG. 14 is a graph illustrating operation of current supply control means;

[0029]FIG. 15 is a flow diagram.

[0030] Basic components of the banknote validator of this embodiment are essentially as shown and described in WO97/26626, the contents of which are incorporated by reference.

[0031] Those basic components will be briefly described below.

[0032] Referring to FIG. 1, in the validator, a banknote 2 is sensed by an optical sensing module 4 as it passes along a predetermined transport plane in the direction of arrow 6.

[0033] The sensing module 4 has two linear arrays of light sources 8, 10 and a linear array of photodetectors 12 directly mounted on the underside of a printed circuit board 14. A control unit 32 and first stage amplifiers 33 for each of the photodetectors are mounted directly on the upper surface of the printed circuit board 14.

[0034] Printed circuit board 14 is provided with a frame 38 made of a rigid material such as metal on the upper surface and around the peripheral edges of the board. This provides the printed circuit board, made of a fibre-glass composite, and the source and detector components mounted on its underside, with a high degree of linearity and uniformity across its width and length. The frame 38 is provided with a connector 40 whereby the control unit 32 communicates with other components (not shown) of the banknote validator, such as a position sensor, a banknote sorting mechanism, an external control unit and the like.

[0035] The optical sensing module 4 has two unitary light guides 16 and 18 for conveying light produced by source arrays 8 and 10 towards and onto a strip of the banknote 2. The light guides 16 and 18 are made from a moulded plexiglass material.

[0036] Each light guide is elongate and rectangular in horizontal cross section and consists of an upper vertical portion and a lower portion which is angled with respect to the upper portion. The angled lower portions of the light guides 16, 18 direct light that has been internally reflected with a light guide 16,18 towards an illuminated strip on the banknote 2 which is centrally located between the light guides 16 and 18.

[0037] Lenses 20 are mounted between the light guides in a linear array corresponding to the detector array 12. One lens 20 is provided per detector in the detector array 12. Each lens 20 delivers light collected from a discrete area on the banknote, larger than the effective area of a detector, to the corresponding detector. The lenses 20 are fixed in place by an optical support 22 located between the light guides 16 and 18.

[0038] The light-emitting ends 24 and 26 of the light guides 16 and 18, and the lenses 20, are arranged so that only diffusely-reflected light is transmitted to the detector array 12.

[0039] The lateral ends 28 and 30, and the inner and outer sides 34 and 36 of the light guides 16 and 18 are polished and metallised.

[0040] Although not evident from FIG. 1, each source array 8 and 10, the detector array 12 and the linear lens array 20, all extend across the width of the light guides 16 and 18, from one lateral side 28 to the other, so as to be able to sense the reflective characteristics of the banknote 2 across its entire width.

[0041] The light detector array 12 is made up of a linear array of a large number of, for example thirty, individual detectors, in the form of pin diodes, which each sense discrete parts of the banknote 2 located along the strip illuminated by the light guides 16 and 18. Adjacent detectors, supplied with diffusely reflected light by respective adjacent lenses 20, detect adjacent, and discrete areas of the banknote 2.

[0042] Reference is made to FIG. 2, which illustrates one of the source arrays 8 as mounted on the printed circuit board 14. The arrangement of the other source array 10 is identical.

[0043] The source array 8 consists of a large number of discrete sources 9, in the form of unencapsulated LEDs. The source array 8 is made up of a number of different groups of the light sources 9, each group generating light at a different peak wavelength. Such an arrangement is described in Swiss patent number 634411, incorporated herein by reference.

[0044] In this embodiment there are six such groups, consisting of four groups of sources generating light at four different infra-red wavelengths, and two groups of sources generating light at two different visible wavelengths (red and green). The wavelengths used are chosen with a view to obtain a great amount of sensitivity to banknote printing inks, hence to provide for a high degree of discrimination between different banknote types, and/or between genuine banknotes and other documents.

[0045] The sources of each colour group are dispersed throughout the linear source array 8. The sources 9 are arranged in the sets 11 of six sources, all sets 11 being aligned end-to-end to form a repetitive colour sequence spanning the source array 8.

[0046] Each colour group in the source array 8, is made up of two series of ten sources 9 connected in parallel to a current generator 13. Although only one current generator 13 is illustrated, seven such generators are therefore provided for the whole array 8. The colour groups are energised in sequence by a local sequencer in a control unit 32, which is mounted on the upper surface of printed circuit board 13. The sequential illumination of different colour groups of a source array is described in more detail in U.S. Pat. No. 5,304,813 and British patent application No. 1470737, which are incorporated herein by reference.

[0047] During banknote sensing all six colour groups are energised and detected in sequence during a detector illumination period for each detector in turn.

[0048] Thus, the detectors 12 effectively scan the diffuse reflectance characteristics at each of the six predetermined wavelengths of a series of pixels located across the entire width of the banknote 2 during a series of individual detector illumination periods. As the banknote is transported in the transport direction 6, an entire surface of the banknote 2 is sensed by repetitive scanning of strips of the banknote 2 at each of the six wavelengths. The outputs of the sensors are processed by the control unit 32 as described in more detail below.

[0049] A validation algorithm, such as that disclosed in European patent application No. 0560023, is used to evaluate the acquired data representative of the banknote in control unit 32. By monitoring the position of the banknote during sensing with an optical position sensor located at the entrance to the transport mechanism used, predetermined areas of the banknote 2 which have optimum reflectance characteristics for evaluation are identified. The sensed reflectance characteristics of the banknote in those areas are compared with that of stored reference values in order to determine whether the banknote falls within predetermined acceptance criteria, whereupon a validation signal is produced by control unit 32.

[0050] Reference is now made to FIG. 3, which illustrates a banknote validator including optical sensing modules as illustrated in FIG. 1. Components already described in relation to FIG. 1 will be referred to by identical reference numerals.

[0051]FIG. 3 shows a banknote validator 50 similar to that described in International patent application No. WO 96/10808, incorporated herein by reference. The apparatus has an entrance defined by nip rollers 52, a transport path defined by further nip rollers 54, 56 and 58, upper wire screen 60 and lower wire screen 62, and an exit defined by frame members 64 to which the wire screens are attached at one end. Frame members 66 support the other end of the wire screens 60 and 62.

[0052] An upper sensing module 4 is located above the transport path to read the upper surface of the banknote 2, and a lower sensing module 104 is located, horizontally spaced from said upper sensing module 4 by nip rollers 56, below the transport path of the banknote 2 to read the lower surface of the banknote 2. Reference drums 68 and 70 are located opposedly to the sensing modules 4 and 104 respectively so as to provide reflective surfaces whereby the sensing devices 4 and 104 can be calibrated. Each of nip rollers 54, 56 and 58 and reference drums 68 and 70 are provided with regularly-spaced grooves accommodating upper and lower wire screens 60 and 62.

[0053] An edge detecting module 72, consisting of an elongate light source (consisting of an array of LEDs and a diffusing means therefor) located below the transport plane of the apparatus 50, a CCD array (with a self-focussing fibre-optic lens array) located above the transport plane and an associated processing unit, is located between entrance nip rollers 52 and the entrance wire supports 66.

[0054]FIG. 4 is a block diagram illustrating the control unit 32 and connections between the control unit and the light source arrays 8, 10 and the sensor array 12.

[0055] With reference to FIG. 4, as mentioned previously, each detector in the detector array 12 is connected to a respective amplifier 33. The output of each amplifier 33 is in turn connected to a respective low pass filter 200. Each low pass filter has a dominant single pole structure with time constant τ and limits the bandwidth to approximately 300 Hz. In this embodiment, τ is approximately 500 μs. The output of each low pass filter 200 is connected to an analog-to-digital converter (ADC) 202, and the output of the ADC 202 is connected to a digital signal processor (DSP) 204. The low pass filters 200, the ADC 202 and the DSP 204 are part of the control unit 32. The control unit 32 also includes a central processing unit (CPU) 206, connected to the ADC 202 and the DSP 204, for overall control of the control Unit 32, and a memory 208 connected to the CPU 206. A DSP memory 209, in the form of RAM, is connected to the DSP 204 and the CPU 206. The control unit 32 further includes a digital-to-analog converter (DAC) 210 connected to the CPU 206 for control of the source arrays 8, 10. More specifically, the DAC 210 is connected to each of the current generators 13 which are connected to respective groups of light sources 9. The low pass filters 200 are shown as elements of the control unit 32 but they may be formed separately, as may other elements of the control unit 32.

[0056] In operation, a document is transported past sensing module 4 by means of the transport rollers 54. As the document is transported past the sensing module, light of the respective wavelength is emitted from each group of sources 9 in sequence, and light of each wavelength reflected from the banknote is sensed by each of the detectors, corresponding to a discrete area of the banknote.

[0057] Each group of sources is driven by a respective current generator 13 which is controlled by the control unit 32 by way of the DAC 210. Each group of sources 9 is driven by current from a current generator corresponding to a predetermined rectangular pulse signal e(t), as shown in FIG. 5. The pulse width and amplitude is the same for each group of sources in this embodiment.

[0058] For each wavelength, light from the respective group of sources 9 is mixed in the optical mixer before being output towards the document. In that way, diffuse light is spread more uniformly across the whole width of the document. Light reflected from the document, which has been modified in accordance with the pattern on the document, is sensed by the detector array and the output signals are processed in the control unit 32.

[0059] Each group of sources for a respective wavelength is driven in turn by an excitation signal e(t), as shown in FIG. 5. The excitation signal in this embodiment is a rectangular pulse signal, having pulse width Tp. The time from the end of a pulse to the beginning of the next pulse (the “off” period) is To. In this embodiment, the excitation signal is the same for each group of sources. However, in order to calibrate the device, the current supplied (amplitude of pulse signal) may be different for different wavelengths, as described in WO97/26626.

[0060]FIG. 6 shows the signal s(t) output from a single sensor in response to a sequence of pulses of light of different wavelengths, after reflection from a document. The signal has a pulse formation, like the excitation signal e(t), with the amplitude modified in accordance with the pattern on the document. The signal s(t) is input to the low pass filter 200.

[0061]FIG. 7 shows the output signal y(t) from the low pass filter 200 as a solid line superimposed on the signal s(t) shown as a broken line. The signal y(t) is sampled by the ADC 202 at a sampling interval Ts resulting a sequence of values y(k), y(k+1) etc. Sampling is performed in the “off” period. Td is the time between the end of each pulse and the sampling point. The sampling interval Ts is close to the time constant τ of the analog filter 200. In this embodiment Ts=560 μs.

[0062] The DSP 204 uses the values y(k) together with an inverse digital filter, corresponding to the inverse of the analog system (consisting of the excitation pulse e(t) and the low pass filter 200) to estimate values representing the pattern on the bill. These estimated values are given by {circumflex over (x)}(k). As these estimated values are based on the values y(k), that is, on a filtered version of s(t), the effect of noise is reduced.

[0063] The inverse digital filter is derived theoretically as follows.

[0064] The transfer function H(s) for the analog system (pulse generation and low pass filter) can be regarded as: ${H(s)} = {^{{({{Tp} + {Td}})} \cdot s} \cdot \frac{1 - ^{{- {Tp}} \cdot s}}{s} \cdot \frac{1}{\left( {{\tau \cdot s} + 1} \right)}}$

[0065] assuming the signal input to the analog filter is now just a Dirac impulse sequence multiplying the signal from the bill x(t), thus x_(s)(t) (see 1 & 2).

x _(s)(t)=u(t)x(t)   1)

[0066] Where:

[0067] 2) ${\left. 2 \right)\quad {u(t)}} = {\sum\limits_{k = {- \infty}}^{+ \infty}{\delta \left( {t - {k \cdot {Ts}}} \right)}}$

[0068] The time domain equivalent of H(s) is:

[0069] 3) ${\left. 3 \right)\quad {h(t)}} = {{\left( {1 - ^{\frac{- {Tp}}{\tau}}} \right) \cdot ^{\frac{- {({{Td} + t})}}{\tau}} \cdot \mu}\quad (t)}$

[0070] Where μ(t) is the Heaviside's step function: $\quad\begin{Bmatrix} {\left. {t < 0}\Rightarrow{\mu (t)} \right. = 0} \\ {\quad {\left. {t \geq 0}\Rightarrow{\mu (t)} \right. = 1}\quad} \end{Bmatrix}$

[0071] The Z transform of h(t) can be derived using the invariant impulse method, which gives:

[0072] 4) ${\left. 4 \right)\quad {H(z)}} = \frac{\left( {1 - ^{\frac{- {Tp}}{\tau}}} \right) \cdot ^{\frac{- {Td}}{\tau}}}{1 - {^{\frac{- {Ts}}{\tau}} \cdot z^{- 1}}}$

[0073] The inverse digital filter D(z) is H⁻¹(z), that is:

[0074] 5) ${\left. 5 \right)\quad {D(z)}} = \frac{1 - {^{\frac{- {Ts}}{\tau}} \cdot z^{- 1}}}{\left( {1 - ^{\frac{- {Tp}}{\tau}}} \right) \cdot ^{\frac{- {Td}}{\tau}}}$

[0075] An estimate of x, {circumflex over (x)}, is derived using a de-convolution process. ${D(z)} = \frac{\hat{X}(z)}{Y(z)}$

[0076] and consequently

{circumflex over (x)}(k)=b ₁ ·y(k)+b ₂ y(k−1)   6)

[0077] Where the coefficients are:

[0078] 7) ${\left. 7 \right)\quad b_{1}} = {{\frac{1}{\left( {1 - ^{\frac{- {Tp}}{\tau}}} \right) \cdot ^{\frac{- {Td}}{\tau}}}\quad b_{2}} = {{- b_{1}} \cdot ^{\frac{- {Ts}}{\tau}}}}$

[0079] Thus, a sequence of estimated amplitude values, {circumflex over (x)}(k), representing the pattern on the bill can be obtained from sampled values of the signal output from the filter. The coefficients b₁ and b₂ are stored in the memory 208 of the control unit. The coefficients are loaded into the DSP memory 209, together with the DSP code, when the apparatus is turned on, or re-booted.

[0080] D(z) is a non-recursive filter which means that dealing with any initial conditions needs only two samples. The estimation of the round-off errors and the noise are also easier to handle with non-recursive processing.

[0081] The coefficients of the inverse digital filter can be calculated theoretically as described above, using an estimate of the time constant τ of the filter.

[0082] Alternatively, the simple LS (least squares) method uses a least mean square estimation of the coefficients by probing the system response with a plurality of excitation signals of known width and amplitude. The model assumes a matrix X of test samples so that X=YB where Y is a matrix of the various test outputs and B is the matrix of researched coefficients. Note that as Y is usually not square, it cannot be inverted. Therefore B can best be estimated using the pseudo inverse matrix method, giving

B=(Y ^(T) Y)⁻¹ Y ^(T) X.

[0083] Other methods known in the theory of adaptive digital filters (such as Wiener, LMS (least mean square), RLS (recursive least square), can be used to yield similar results and find optimal filter coefficients. These methods are described for example in ISBN 0 201 54413 Digital Signal Processing, Ifeachor & Jervis).

[0084] These methods of estimating the coefficients allows the model to be fitted to the values of the actual analog components used in a specific validator unit, allowing for compensation of the dispersion of components values in various units of a production batch. This calibration process takes place either before reading the document, and/or it can be performed at regular time intervals or each time a document is inserted, during initialisation.

[0085] In practice, the excitation is generated by controlling the intensity of current in an LED. The amplitude at the input of the filter depends on the optical transfer function of the system at calibration time and can vary during the product life. This problem can be addressed as the test excitation can be directly measured at the input of the filter, or deduced from measurement at the output of the filter. The pulse width can be made large enough to neglect the effect of the time constant of the filter. (For example substantially 8τ for a single pole filter and an error <1LSB of a 12 bits A/D converter.)

[0086] The above discussion was limited to the output from one sensor. The embodiment actually includes several sensors, which are read in parallel, and the outputs from each sensor, for each pulse of each wavelength, are handled sequentially by the ADC 202.

[0087] In order to reduce further the noise, another digital filter is added to filter the output of the inverse filter.

[0088] This is possible because the maximal frequency content of the signal on a banknote is typically approximately in the range of 50 Hz for each wavelength, for a typical banknote transport speed of about 400 mm/sec with a sensor diameter of approximately 5-10 mm, where as the detector circuit needs a higher bandwidth in order to pass all the 6 wavelengths in sequence. Because of this situation, for each wavelength, a decimation process by ⅙ can be used, sending each individual wavelength data into a corresponding digital low-pass filter of bandwidth substantially 50 Hz. In this embodiment, the further digital filters are 2^(nd) order Butterworth filters, although other suitable known filters may be used. This arrangement is shown schematically in FIG. 8. With such an arrangement, the RMS of quantization noise can be reduced, for example, by about a factor of 2, assuming that 50 Hz is sufficient for the banknote signal x(t).

[0089] The values {circumflex over (x)}(k) representing the pattern on the banknote are used for validating the banknote according to a suitable known method, for example, by comparing values with stored reference windows representative of acceptable banknotes. Preferably, the values are taken from predetermined areas of the banknote.

[0090] In a modification of the embodiment described above, the device is calibrated by adjusting the pulse widths of the excitation signal. This may be instead of or as well as calibration by adjusting the current levels.

[0091] The calibration process is performed using the reference drums 68, 70 or a reference media such as air or a reference bill, where the expected reference output x_(R) for each detector is known.

[0092]FIG. 9 shows an example of an excitation signal e(t) for use with the light sources having successive pulses of different widths. Tp is the maximum pulse width and To is the minimum time off. Tw is an arbitrary pulse width. The following discussion shows in theory how the pulse width Tw can be adjusted to obtain the desired measurement on the detector side.

[0093] Equation 6 above shows that the estimate of x is the sum of two terms. One deals with the previous LP filter output signal y(k−1) taken during To (where every source is off), therefore this will not be affected by the next excitation pulse. On the other hand the y(k) term includes the effect of the current pulse.

[0094] The equation 8 shows the structure of y(k) assuming we have a linear system and the superposition theorem can be applied.

[0095] 8) ${\left. 8 \right)\quad {y(k)}} = {{{y_{o}(k)} \cdot ^{\frac{- {Tp}}{\tau}}} + \underset{\underset{\Delta \quad {y{(k)}}}{}}{{y\left( {k - 1} \right)} \cdot ^{\frac{- {Ts}}{\tau}}}}$

[0096] Where:

[0097] 9) ${\left. 9 \right)\quad {y_{o}(k)}} = {\left( {1 - ^{\frac{- {Tw}}{\tau}}} \right) \cdot {x(k)}}$

[0098] y_(o)(k) corresponds to the whole effect of the current excitation only, assuming the initial condition is null.

[0099] Consider first the actual measured value x(k) for a pulse width Tw which is equal to Tp, compared with the expected reference value x_(R)(k). If x(k) is not the same as x_(R)(k) , then Tw can be adjusted so that y_(o)(k) based on x(k) and Tw is the same as for x_(R)(k) and Tp. If x(k)>x_(R)(k) then Tw<Tp (a larger x(k) means a larger asymptote for y_(o)(t)). In other words, Tw must be reduced in order to meet the expected y_(o)(k) value. This is illustrated in FIG. 10.

[0100] The above discussion shows that for a measured value that is greater than the desired reference value, calibration can be performed by shortening the associated pulse width.

[0101] Preferably, the pulse width is adjusted such that the computed value {circumflex over (x)}(k)=x_(R)(k).

[0102] We estimate Tw in order to get at the output of the deconvolution filter: {circumflex over (x)}(k)=x_(R)(k).

[0103] Assuming a current actual excitation is x(k), the equation 10 gives its relation with the reconstructed value {circumflex over (x)}(k).

[0104] 10) ${\left. 10 \right)\quad {x(k)}} = {\left( \frac{1 - ^{\frac{- {Tw}}{\tau}}}{1 - ^{\frac{- {Tp}}{\tau}}} \right) \cdot {x(k)}}$

[0105] We want {circumflex over (x)}(k)=x_(R)(k) therefore:

[0106] 11) $\begin{matrix} {{{Tw} = {{- L}\quad {{n\left( {1 - \frac{1 - ^{\frac{- {Tp}}{\tau}}}{\delta_{x}(k)}} \right)} \cdot \tau}\quad {Where}}}\quad} & \left. 11 \right) \\ {\quad {{\delta_{x}(k)} = \frac{x(k)}{x_{R}(k)}}} & \left. 12 \right) \end{matrix}$

[0107] We can see that:

δ_(x)(k)=1

Tw=Tp

δ_(x)(k)→+∞

Tw=0

[0108] The equation 11 shows that the pulse width is a logarithmic function. Depending on the ratio Tp/τ, a linear approximation can also be used. As example, FIG. 11 shows a plot of the ratio $\frac{\hat{x}(k)}{x(k)} = \left( \frac{1 - ^{\frac{- {kTp}}{\tau}}}{1 - ^{\frac{- {Tp}}{\tau}}} \right)$

[0109] for Tp/τ=1 as function of k compared to a linear curve.

[0110] The practical implementation can be done in different ways, one being to use the above equation 12 to compute values for Tw for each light source. Preferably, a table of excitation values with various output levels is built to allow for the imperfections of the actual unit compare to a theoretical model. To build the table, the pulse width is tried by a classical successive approximation to cover the signal dynamic and the DAC value corresponding to the desired output is stored in memory from which it can be retrieved when measuring the document. The table can be built by measurement in the air or through a calibration paper, the transitivity of which is chosen similar to a typical document. When the table is built with air data, a correction factor is used to select the right value to use later when measuring a document. A suitable value of correction factor can be predetermined by the ratio between the signal in the air and the signal in a calibration paper and stored in memory.

[0111] The above procedure can be used to obtain different pulse widths for LEDs of different wavelengths, or to obtain different pulse widths for different LEDs of the same wavelength. For a group of IEDs emitting light of the same wavelength, brighter LEDs require a shorter pulse width than weaker LEDs. The leading edge of a shorter pulse is delayed so that all the pulses end at the same time, which enables the deconvolution process described above to be used. Two alternative implementations for such an arrangement are shown in FIGS. 12 and 13 with the associated timing diagram in FIG. 14.

[0112] In a further modification, pulse width modulation can be used during normal operation of the validator, during document data acquisition, that is other than in the initial calibration, thereby providing a form of “Automatic Range Control”.

[0113] In that way, the signal can be maximised, improving the signal to noise ratio and avoiding signal conversion in the low range of the ADC.

[0114] For a given LED, using the current signal, the next value for the LED brightness, and the corresponding pulse width of the current signal, is determined in order to enhance the signal. In other words, if the current LED output is relatively low, then the intensity of the next LED pulse is increased by a factor F. The factor F will need to be calculated in accordance with the expected maximum variation in the document to avoid clipping of the signal in the subsequent processing. The factor F is subsequently removed in the detected signal digitally by applying a correction factor 1/F to regain the original value of the document.

[0115]FIG. 15 is a flow diagram setting out an example of a pulse width modulation method during operation for an LED of a specific wavelength, in a device operating with LEDs of six wavelengths. Here maximum and minimum desired values y_(H) and y_(L) and step factor SF are selected in accordance with characteristics and dynamics of the validator (such as detector size, speed of movement of the banknote, ADC scale, dynamic for the bill being processed or for the group of bills accepted by the validator etc). The maximum value y(k) from all of the detectors for a given pulse of a given wavelength is determined. If y(k) is less than y_(L) or higher than y_(H), then the current pulse width is increased or decreased by multiplication or division by the step factor SF accordingly to get a suitably higher or lower value for y at the next pulse.

[0116] In the above discussion, the excitation signal has a rectangular pulse and a low pass single pole filter is used to filter the signals from the detectors. Other excitation waveforms and more complex filters can be used, with consequential modification of the inverse transfer function, as will be understood by the person skilled in the art.

[0117] The embodiment is described as a banknote validator but is applicable to other document sensors, such as other value sheet validators.

[0118] Furthermore, as the essence of the invention relates to signal processing, it can be used in association with other types of currency handling machines or validators such as coin validators where a signal representative of a characteristic of a coin is filtered and then reconstructed from the signal output from the filter. Examples of coin handling machines which use signals from sensors influenced by a coin, and which could be adapted in accordance with the invention, are given in EP-A-0 489 041, GB-A-2 093 620 and EP 0 710 933.

[0119] In the previous description, the sampling frequency is constant and in that case different sets of filter coefficients may be required for each channel.

[0120] However, in another aspect of the invention, another advantage of the 2 coefficients non recursive filter is that it is possible to modulate the sampling frequency and allocate different pulse width maximum time slots for each wavelength. The impact on the performance is a change in the noise level. For example shorter pulses and higher sampling frequency, ie lower sampling period can be used with infra-red LEDs where the signal is strong and the signal to noise ratio sufficient to tolerate a higher noise level. To the contrary, for the blue LED for example, a longer pulse and a longer sampling period can be used, causing a longer integration improving the noise reduction. In that case, the filter coefficient must be adapted to the current sampling period.

[0121] The sources and detectors in the embodiment are LEDs and pin diodes but other suitable sources and detectors, such as photo-transistors, may be used.

[0122] The embodiment measures light reflected from a banknote, but the invention may be used in association with a document sensor which measures light transmitted through the document.

[0123] Instead of a FIR, a recursive filter (Infinite Impulse Response, IIR, filter) could be used. For example, when the excitation signal has no off signal, a recursive filter is used.

[0124] Another alternative is to operate in the Fourier domain using fast fourier transforms (FFPT) and inverse FFT to return to the time domain. This has the advantage that it is only necessary to compute the spectrum for the frequencies of interest (in the given example using a banknote, between about 50 Hz and 300 Hz). This approach is particularly useful when the filters have a large number of coefficients, because it requires fewer operations.

[0125] In this specification, the term light is not limited to visible light, but covers the whole electromagnetic wave spectrum. The term currency covers, for example, banknotes, bills, coins, value sheets or coupons, cards and the like, genuine or counterfeit, and other items such as tokens, slugs, washers which might be used in a currency handling mechanism.

[0126] Although the invention has been described in detail as one embodiment with modifications thereof, aspects of the invention can be embodied independently of each other. 

1. A device for sensing currency comprising means for deriving a signal from a currency item and means for deriving values representative of a characteristic or characteristics of the currency item from said signal using an inverse representation of part of the sensing device.
 2. A device as claimed in claim 1 wherein the signal generating means comprises a component or components equivalent to a sensor for sensing an excitation from an excitation source as modified by a currency item and a filter.
 3. A device as claimed in claim 2 wherein the signal generating means comprises an excitation sensor and an associated filter.
 4. A device as claimed in claim 2 wherein the excitation sensor is equivalent to a sensor and a filter.
 5. A device as claimed in any one of claims 2 to 4 wherein the deriving means uses an inverse representation of said filter.
 6. A device as claimed in any one of claims 2 to 5 wherein the filter is a low-pass filter.
 7. A device as claimed in any one of claims 2 to 5 wherein the filter is a single pole filter.
 8. A device as claimed in any one of claims 2 to 5 wherein the filter is a bandpass filter.
 9. A device as claimed in any preceding claim comprising an analog to digital convertor for sampling a signal derived from a currency item.
 10. A device as claimed in claim 9 wherein the deriving means uses an inverse representation of at least part of the sensing device up to the analog to digital convertor.
 11. A device as claimed in claim 9 or claim 10 wherein the deriving means uses a digital filter having a transfer function corresponding to said inverse representation of part of the sensing device.
 12. A device as claimed in claim 11 comprising at least one further digital filter for filtering the values derived using the inverse digital inverse filter.
 13. A device as claimed in claim 12 wherein the further digital filter is a 2nd order filter.
 14. A device as claimed in claim 12 wherein the further digital filter is a Butterworth filter.
 15. A device as claimed in claim 12 wherein the further digital filter limits the signal to a frequency range corresponding approximately to the frequency range of the characteristic or characteristics of the currency item.
 16. A device as claimed in claim 15 wherein the further digital filter has a cut-off frequency of approximately 50 Hz.
 17. A device as claimed in any preceding claim comprising at least one excitation source controlled using an excitation signal.
 18. A device as claimed in claim 17 wherein the deriving means uses an inverse representation of the excitation signal.
 19. A device as claimed in claim 17 or claim 18 wherein the excitation signal is composed of pulses.
 20. A device as claimed in claim 19 wherein the pulses are rectangular pulses.
 21. A device as claimed in claim 19 or claim 20 wherein measurements are taken when the pulses are off.
 22. A device as claimed in any one of claims 19 to 21 wherein at least two excitation sources are driven by respective pulse excitation signals having different pulse widths.
 23. A device as claimed in claim 22 wherein the pulses are arranged to end substantially simultaneously.
 24. A device as claimed in claim 22 or claim 23 wherein a plurality of excitation sources are driven by common current programming means which sets a current pulse of duration t, the device further comprising means for supplying pulse signals to sources of duration less than or equal to t.
 25. A device as claimed in any one of claims 17 to 24 wherein the excitation signal is controlled by current programming means comprising a DAC.
 26. A device as claimed in any one of claims 17 to 25 wherein the or each excitation source is a light source and the or each excitation sensor is a light sensor for sensing light reflected from or transmitted by the currency item.
 27. A device as claimed in claim 26 comprising a plurality of light sources.
 28. A device as claimed in claim 27 comprising a plurality of light sources for emitting light of the same wavelength.
 29. A device as claimed in claim 27 comprising a plurality of light sources for emitting light of different wavelengths.
 30. A device as claimed in claim 11 or any one of claims 12 to 29 dependent on claim 11 wherein the inverse digital filter is a finite impulse response filter.
 31. A device as claimed in claim 30 where the FIR filter is a 2 coefficients filter and where a kth sample value {circumflex over (x)}(k) of the signal input to the filter is estimated from the kth output sample y(k) and the preceding output sample y(k−1) of said filter using the equation {circumflex over (x)}(k)=b₁·y(k)+b₂·y(k−1) where b₁ and b₂ are two pre-determined coefficients.
 32. A device as claimed in claim 31 where b₁ is approximately equal to $\frac{1}{\left( {1 - ^{\frac{- {Tp}}{\tau}}} \right) \cdot ^{\frac{- {Td}}{\tau}}}$

and b₂ is approximately equal to $\begin{matrix} {{- b_{1}} \cdot ^{\frac{- {Ts}}{\tau}}} & \quad \end{matrix}$

where τ is the time constant of the filter and Ts is the sampling period and Tp is the pulse width time of the excitation signal.
 33. A device as claimed in any preceding claim where a sampling period Ts is constant.
 34. A device as claimed in any one of claims 1 to 32 where a sampling period Ts is variable.
 35. The device of claim 34 dependent on claim 31 or claim 32 where the filter coefficients b₁ and b₂ change according to Ts.
 36. A device as claimed in any preceding claim for sensing documents.
 37. A device as claimed in any preceding claim for sensing banknotes.
 38. A device as claimed in any preceding claim wherein the deriving means is a digital signal processor.
 39. A device as claimed in claim 38 comprising a memory associated with the digital signal processor for storing the inverse representation.
 40. A method of manufacturing or adjusting a device as claimed in claim 11 comprising estimating the coefficients of the inverse digital filter according to a least squares (LS), a least mean square (LMS) or a recursive least square (RLS) method.
 41. A method as claimed in claim 40 comprising using a plurality of known test inputs.
 42. A method of sensing a currency item using a device as claimed in claim 1 comprising generating a signal from a currency item; and deriving values representative of characteristics of the currency item using an inverse representation of part of the sensing device.
 43. A method of adjusting a currency sensing device comprising at least one excitation source and at least one excitation sensor, each source being controllable by a pulse excitation signal, the method comprising adjusting the width of the pulses such that a signal derived from the excitation sensor approaches a desired value or set of values.
 44. A method of adjusting the gain of the device of claim 19 dependent on claim 11 by using a pre-defined set of coefficients of the inverse digital filter, which are defined for a nominal predetermined excitation pulse width and using another pulse width for the measurement of the currency item.
 45. A method as claimed in claim 43 or claim 44 where the pulse width is adjusted within a sampling period by delaying the leading edge of the ON state, the trailing edge being always at the same period after the beginning of the sampling period.
 46. A method as claimed in claim 45 wherein each of a plurality of excitation sources is driven by respective pulses ending at the same time within a sampling period.
 47. A method as claimed in claim 47 wherein the excitation sources are light sources of approximately the same wavelength.
 48. A method as claimed in claim 46 or claim 47 wherein the excitation sources are further driven at respective current levels.
 49. A method as claimed in any one of claims 46 to 48 where the pulse width for at least one excitation source is adjusted during the measurement sequence of a currency item.
 50. A method as claimed in claim 49 where the pulse width is adapted using a predictive technique using an estimation of the current signal dynamic based on at least 2 past samples.
 51. A method as claimed in claim 49 or claim 50 where the pulse width is adapted using a predictive technique using a predetermined maximum dynamic.
 52. A method of adapting the drive current of a light source in an optical sensing device wherein the drive current is adapted based on a predictive technique using the current signal dynamic of a measured currency item.
 53. The measurement system of a currency validator comprising: a plurality of LED sources of different wavelengths, at least one signal detector connected to an analog filter, which is connected to at least one analog to digital converting means, which is connected to processing means for computing a digital filter, the transfer function of which corresponds to the inverse transfer function of the product of the filter and the excitation signal to reconstruct the amplitude signal at the input of the analog filter, the processing means being connected to a plurality of digital low-pass filters, each selectively filtering the signal samples corresponding to each wavelength.
 54. A control unit for a currency sensing device as claimed in claim 1 comprising means for deriving values representative of a currency item from a filtered output signal using an inverse representation of the filter.
 55. An optical sensing device comprising a plurality of light sources and means for independently adjusting the widths of light pulses output by different light sources.
 56. A device as claimed in claim 55 comprising means for independently adjusting the width of the current pulse applied to different light sources.
 57. A currency sensor comprising means of generating a signal corresponding to a currency item using at least one pulsed excitation source wherein measurements of said signal are taken at points corresponding to when the excitation source is off.
 58. A currency validator comprising means for deriving a signal from a currency item and a digital signal processor for processing said signal.
 59. A currency validator as claimed in claim 58 comprising filter means, wherein the DSP is for processing a signal after filtering and for reconstructing values corresponding to the signal without filtering, for use in testing the validity of a currency item. 